package com.hutou.chuangke.activity;

import android.content.Context;
import android.os.Bundle;
import android.support.v7.app.ActionBar;
import android.support.v7.widget.Toolbar;
import android.view.View;
import android.widget.TextView;

import com.hutou.chuangke.R;
import com.hutou.chuangke.uitl.CommonUtils;
import com.hutou.chuangke.uitl.Utils;

/**
 * Created by Administrator on 2017/4/24.
 */

public class AboutActivity extends BaseActivity{
    Context mContext;
    Toolbar toolbar;
    TextView version_tv;
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_about);
        mContext = AboutActivity.this;
        initView();
    }

    private void initView() {
        toolbar = (Toolbar) findViewById(R.id.toolbar);
        toolbar.setPadding(0, CommonUtils.getStatusHeight(mContext), 0, 0);
        setSupportActionBar(toolbar);
        final ActionBar ab = getSupportActionBar();
        ab.setHomeAsUpIndicator(R.drawable.actionbar_back);
        ab.setDisplayHomeAsUpEnabled(true);
        ab.setTitle("");
        toolbar.setNavigationOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                onBackPressed();
            }
        });
        showQuickControl(false);

        version_tv = (TextView) findViewById(R.id.version_tv);
        version_tv.setText("V:"+Utils.getAppVersionName(mContext));
    }
}
